package com.woniuxy.permission.service;

import com.woniuxy.permission.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.permission.form.AddRoleForm;

import java.util.List;

/**
 * <p>
 * 角色表 服务类
 * </p>
 *
 * @author author
 * @since 2025-05-13
 */
public interface IRoleService extends IService<Role> {


    void addRole(AddRoleForm form) throws Exception;

    void deleteRole(Integer roleId) throws Exception;

    Object getAllRole() throws Exception;


    /**
     * 为角色分配资源（覆盖原有绑定）
     * @param roleId 角色ID
     * @param resourceIds 资源ID列表
     */
    void assignResources(Integer roleId, List<Integer> resourceIds);
}
